// 1.判断对象的数据类型
const isType=type=>target=>`[object ${type}]`===Object.prototype.toString.call(target);
const isArray =isType('Array');
console.log(isArray([]));
class Chameleon {
    static colorChange(newColor) {
        this.newColor = newColor;
    }

    constructor({ newColor = "green" } = {}) {
        this.newColor = newColor;
    }
}

const freddie = new Chameleon({ newColor: "purple" });
freddie.colorChange("orange");
